<link rel="stylesheet" type="text/css" href="__CDN__/assets/addons/mall/__STYLE__/css/order.css" media="all">

<form id="edit-form" class="form-horizontal" role="form" data-toggle="validator" method="POST" action="">
    <input disabled id="c-id" name="row[id]" type="hidden" value="{$row.id}">
    <div class='order-box'>
        <div class='box-head'>日志信息</div>
        {if in_array($row['status'],["rejected","unpay","canceled","undeliver","unreceive","unappraise","finished"])}
            <div class='log-box'>
                <div class="state">
                    {if $row['payType']==1}
                        <div class="icon">
                            <span class="icons {if condition="in_array($row['status'],['unpay','undeliver','unreceive','unappraise'])"}icon12 {else}icon11 {/if}{if condition="$row['status']=='unpay'"}icon13 {/if}"></span>
                        </div>
                        <div class="arrow {if condition="($row['status']=='undeliver') OR ($row['status']=='unreceive') OR ($row['status']=='unappraise')"}arrow2{/if}">··················></div>
                        <div class="icon"><span class="icons {if condition="in_array($row['status'],['undeliver','unreceive','unappraise']) OR ($row['status']=='canceled' && $row['needPay']>0)"}icon22 {else}icon21{/if}{if condition="$row['status']=='undeliver' OR ($row['status']=='canceled' && $row['needPay']>0)"}icon23 {/if}"></span></div>
                        <div class="arrow {if condition="($row['status']=='unreceive') OR ($row['status']=='unappraise')"}arrow2{/if}">··················></div>
                    {else}
                        <div class="icon">
                            <span class="icons {if condition="($row['status']=='rejected') OR ($row['status']=='undeliver') OR ($row['status']=='unreceive') OR ($row['status']=='unappraise')"}icon12 {else}icon11 {/if}{if condition="($row['status']=='undeliver')"}icon13 {/if}"></span>
                        </div>
                        <div class="arrow {if condition="($row['status']=='unreceive') OR ($row['status']=='unappraise')"}arrow2{/if}">················></div>
                    {/if}
                    <div class="icon">
                        <span class="icons {if condition="in_array($row['status'],['undeliver','unreceive','unappraise']) OR ($row['status']=='canceled' && $row['realTotalMoney']>0)"}icon32 {else}icon31 {/if}{if condition="$row['status']=='unreceive' OR ($row['status']=='canceled' && $row['realTotalMoney']>0)"}icon33 {/if}"></span>
                    </div>
                    <div class="arrow {if condition="($row['status']=='unappraise')"}arrow2{/if}">··················></div>
                    <div class="icon"><span class="icons {if condition="($row['status']=='unappraise') AND ($row['appraiseis']==1)"}icon42 {else}icon41 {/if}{if condition="(($row['status']=='unappraise') AND ($row['appraiseis']==0)) OR $row['status']=='rejected'"}icon43 {/if}"></span></div>
                    <div class="arrow {if condition="($row['appraiseis']==1)"}arrow2{/if}">··················></div>
                    <div class="icon"><span class="icons {if condition="($row['appraiseis']==1)"}icon53 {else}icon51 {/if}"></span></div>
                </div>
                <div class="state2">
                    <div class="path">
                        {volist name="$row['log']" id="lo"}
                        <span>{$lo['logContent']}<br/>{$lo['logTime']}</span>
                        {/volist}
                    </div>
                    <p>下单</p>{if $row['payType']==1}<p>等待支付</p>{/if}<p>商家发货</p><p>确认收货</p><p>订单结束<br/>双方互评</p>
                </div>
                <div class="mall-clear"></div>
            </div>
        {else}
            <div>
                <table class='log'>
                    {volist name='$row["log"]' id='vo'}
                    <tr>
                        <td>{$vo['logTime']}</td>
                        <td>{$vo['logContent']}</td>
                    </tr>
                    {/volist}
                </table>
            </div>
        {/if}
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Orderno')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input disabled id="c-orderNo" data-rule="required" class="form-control" name="row[orderNo]" type="text" value="{$row.orderNo}">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Paytype')}:</label>
        <div class="col-xs-12 col-sm-8">
            <div class="radio" disabled >
                <label for="row[payType]-0"><input id="row[payType]-0" name="row[payType]" type="radio" value="0" {if  $row.payType==0}checked{/if} /> {:__("Paytype 0")}</label>
                <label for="row[payType]-1"><input id="row[payType]-1" name="row[payType]" type="radio" value="1" {if  $row.payType==1}checked{/if} /> {:__("Paytype 1")}</label>
            </div>
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Delivertype')}:</label>
        <div class="col-xs-12 col-sm-8">
            <div class="radio" disabled >
                <label for="row[deliverType]-0"><input id="row[deliverType]-0" name="row[deliverType]" type="radio" value="0" {if  $row.deliverType==0}checked{/if} /> {:__("Delivertype 0")}</label>
                <label for="row[deliverType]-1"><input id="row[deliverType]-1" name="row[deliverType]" type="radio" value="1" {if  $row.deliverType==1}checked{/if} /> {:__("Delivertype 1")}</label>
            </div>
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Orderremarks')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input disabled id="c-orderRemarks" class="form-control" name="row[orderRemarks]" type="text" value="{$row.orderRemarks}">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Invoiceis')}:</label>
        <div class="col-xs-12 col-sm-8">

            <input  id="c-invoiceis" name="row[invoiceis]" type="hidden" value="{$row.invoiceis}">
            <a href="javascript:;" data-toggle="switcher" class="btn-switcher" data-input-id="c-invoiceis" data-yes="1" data-no="0" >
                <i class="fa fa-toggle-on text-success {eq name="$row.invoiceis" value="0"}fa-flip-horizontal text-gray{/eq} fa-2x"></i>
            </a>
        </div>
    </div>
    {if $row['invoiceis']==1}
    {php}$invoiceArr = json_decode($row['invoiceJson'],true);{/php}
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">发票抬头：:</label>
        <div class="col-xs-12 col-sm-8">
            {if $row['invoiceis']==1}
            <input disabled class="form-control" type="text" value="{$invoiceArr['invoiceHead']}">
            {/if}
        </div>
    </div>
    {if isset($invoiceArr['invoiceCode'])}
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">发票税号:</label>
        <div class="col-xs-12 col-sm-8">
            <input disabled class="form-control" type="text" value="{$invoiceArr['invoiceCode']}">
        </div>
    </div>
    {/if}
    {/if}
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Username')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input disabled id="c-userName" data-rule="required" class="form-control" name="row[userName]" type="text" value="{$row.userName}">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Area_ids')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-area_ids" data-rule="required" data-multiple="true" class="form-control" name="row[area_ids]" type="hidden" value="{$row.area_ids}">
            <div class="col-xs-3">
                <input data-params='{"custom[pid]":"0"}' id="c-category1" data-source="/user/mall/oper/area/selectpage" class="form-control selectpage" placeholder="{:__('Category L1')}" type="text">
            </div>
            <div class="col-xs-3">
                <input id="c-category2" data-source="/user/mall/oper/area/selectpage" class="form-control selectpage" placeholder="{:__('Category L2')}" type="text">
            </div>
            <div class="col-xs-3">
                <input id="c-category3" data-source="/user/mall/oper/area/selectpage" class="form-control selectpage" placeholder="{:__('Category L3')}" type="text">
            </div>
            <div class="col-xs-3">
                <input id="c-category4" data-source="/user/mall/oper/area/selectpage" class="form-control selectpage" placeholder="{:__('Category L4')}" type="text">
            </div>

        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Useraddress')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input disabled id="c-userAddress" data-rule="required" class="form-control" name="row[userAddress]" type="text" value="{$row.userAddress}">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Userphone')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input disabled id="c-userPhone" class="form-control" name="row[userPhone]" type="text" value="{$row.userPhone}">
        </div>
    </div>
    <div class="form-group">
        <div class="col-xs-12 col-sm-10">
            <table id="table" class="table table-striped table-bordered table-hover table-nowrap"
                width="100%">
            </table>
        </div>
    </div>
    <div class="form-group order-box">
        <div class='col-xs-12 col-sm-10 goods-footer'>
            <div class='goods-summary' style='text-align:right'>
                <div class='summary'>{:__("Goodsmoney")}：¥<span>{$row['goodsMoney']}</span></div>
                <div class='summary'>{:__("Delivermoney")}：¥<span>{$row['deliverMoney']}</span></div>
                <div class='summary line'>{:__("Totalmoney")}：¥<span>{$row['totalMoney']}</span></div>
                <div class='summary'>{:__("Scoremoney")}：¥-<span>{$row['scoreMoney']}</span></div>
                {if condition="$row['useScore'] gt 0"}
                <div class='summary '>{:__("Usescore")}：<span>{$row['useScore']}个</span></div>
                {/if}
                {:hook('homeDocumentOrderSummaryView',['order'=>$row])}
                <div class='summary'>{:__("realTotalMoney")}：¥<span>{$row['realTotalMoney']}</span></div>
                <div>{:__("Orderscore")}：<span class='orderScore'>{$row["orderScore"]}</span>个</div>
            </div>
        </div>
    </div>
</form>
